home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / amigae / mac2e_v40.lha / Mac2E / MacroFiles / mui.ma < prev   
Encoding:
Text File  |  1994-08-28  |  21.4 KB  |  610 lines

  1. ****************************************************************************
  2. **
  3. ** MUI - MagicUserInterface
  4. ** (c) 1993 by Stefan Stuntz
  5. **
  6. ** Main Header File
  7. **
  8. ****************************************************************************
  9. **
  10. ** This file is a modified version of the orginal mui.h file (provided with
  11. ** MUI v2.2) in order to be used in E programs.
  12. **
  13. ** '$VER: mui_e 1.4 (27.08.94)'
  14. **
  15. ** August 1994, Lionel Vintenat
  16. **
  17. ****************************************************************************
  18. ** Class Tree
  19. ****************************************************************************
  20. **
  21. ** rootclass             (BOOPSI's base class)
  22. ** +--Notify             (implements notification mechanism)
  23. **    +--Family        (handles multiple children)
  24. **    !  +--Menustrip         (describes a complete menu strip)
  25. **    !  +--Menu       (describes a single menu)
  26. **    !  \--Menuitem        (describes a single menu item)
  27. **    +--Application        (main class for all applications)
  28. **    +--Window        (handles intuition window related topics)
  29. **    +--Area           (base class for all GUI elements)
  30. **     +--Rectangle       (creates (empty) rectangles)
  31. **     +--Image        (creates images)
  32. **     +--Text       (creates some text)
  33. **     +--String         (creates a string gadget)
  34. **     +--Prop       (creates a proportional gadget)
  35. **     +--Gauge        (creates a fule gauge)
  36. **     +--Scale        (creates a percentage scale)
  37. **     +--Boopsi         (interface to BOOPSI gadgets)
  38. **     +--Colorfield       (creates a field with changeable color)
  39. **     +--List       (creates a line-oriented list)
  40. **     !  +--Floattext   (special list with floating text)
  41. **     !  +--Volumelist  (special list with volumes)
  42. **     !  +--Scrmodelist (special list with screen modes)
  43. **     !  \--Dirlist       (special list with files)
  44. **     +--Group        (groups other GUI elements)
  45. **        +--Register    (handles page groups with titles)
  46. **        +--Virtgroup   (handles virtual groups)
  47. **        +--Scrollgroup (handles virtual groups with scrollers)
  48. **        +--Scrollbar   (creates a scrollbar)
  49. **        +--Listview    (creates a listview)
  50. **        +--Radio       (creates radio buttons)
  51. **        +--Cycle       (creates cycle gadgets)
  52. **        +--Slider       (creates slider gadgets)
  53. **        +--Coloradjust (creates some RGB sliders)
  54. **        +--Palette       (creates a complete palette gadget)
  55. **        +--Colorpanel  (creates a panel of colors)
  56. **        +--Popstring   (base class for popups)
  57. **          +--Popobject(popup a MUI object in a window)
  58. **          \--Popasl   (popup an asl requester)
  59. **
  60. ****************************************************************************
  61. ** General Header File Information
  62. ****************************************************************************
  63. **
  64. ** All macro and structure definitions follow these rules:
  65. **
  66. ** Name             Meaning
  67. **
  68. ** MUIC_<class>           Name of a class
  69. ** MUIM_<class>_<method>      Method
  70. ** MUIP_<class>_<method>      Methods parameter structure
  71. ** MUIV_<class>_<method>_<x>  Special method value
  72. ** MUIA_<class>_<attrib>      Attribute
  73. ** MUIV_<class>_<attrib>_<x>  Special attribute value
  74. ** MUIE_<error>           Error return code from MUI_Error()
  75. ** MUII_<name>              Standard MUI image
  76. ** MUIX_<code>              Control codes for text strings
  77. ** MUIO_<name>              Object type for MUI_MakeObject()
  78. **
  79. ** MUIA_... attribute definitions are followed by a comment
  80. ** consisting of the three possible letters I, S and G.
  81. ** I: it's possible to specify this attribute at object creation time.
  82. ** S: it's possible to change this attribute with SetAttrs().
  83. ** G: it's possible to get this attribute with GetAttr().
  84. **
  85. ** Items marked with "Custom Class" are for use in custom classes only!
  86. **
  87.  
  88.  
  89.  
  90. ***************************************************************************
  91. ** Library specification
  92. ***************************************************************************
  93.  
  94. #define MUIMASTER_NAME 'muimaster.library'
  95.  
  96.  
  97.  
  98. ****************************************************************************
  99. ** Control codes for text strings
  100. ****************************************************************************
  101.  
  102. #define MUIX_R    '\er'    -> right justified
  103. #define MUIX_C    '\ec'    -> centered
  104. #define MUIX_L    '\el'    -> left justified
  105.  
  106. #define MUIX_N    '\en'    -> normal
  107. #define MUIX_B    '\eb'    -> bold
  108. #define MUIX_I    '\ei'    -> italic
  109. #define MUIX_U    '\eu'    -> underlined
  110.  
  111. #define MUIX_PT    '\e2'    -> text pen
  112. #define MUIX_PH    '\e8'    -> highlight text pen
  113.  
  114.  
  115.  
  116. ***************************************************************************
  117. **
  118. ** Macro Section
  119. ** -------------
  120. **
  121. ** To make GUI creation more easy and understandable, you can use the
  122. ** macros below.
  123. **
  124. ***************************************************************************
  125.  
  126. ***************************************************************************
  127. **
  128. ** Object Generation
  129. ** -----------------
  130. **
  131. ** The xxxObject (and xChilds) macros generate new instances of MUI classes.
  132. ** Every xxxObject can be followed by tagitems specifying initial create
  133. ** time attributes for the new object and must be terminated with the
  134. ** End macro:
  135. **
  136. ** obj = StringObject,
  137. **            MUIA_String_Contents, "foo",
  138. **            MUIA_String_MaxLen    , 40,
  139. **            End;
  140. **
  141. ** With the Child, SubWindow and WindowContents shortcuts you can
  142. ** construct a complete GUI within one command:
  143. **
  144. ** app = ApplicationObject,
  145. **
  146. **            ...
  147. **
  148. **            SubWindow, WindowObject,
  149. **                WindowContents, VGroup,
  150. **                    Child, String("foo",40),
  151. **                    Child, String("bar",50),
  152. **                    Child, HGroup,
  153. **                     Child, CheckMark(TRUE),
  154. **                     Child, CheckMark(FALSE),
  155. **                     End,
  156. **                    End,
  157. **                End,
  158. **
  159. **            SubWindow, WindowObject,
  160. **                WindowContents, HGroup,
  161. **                    Child, ...,
  162. **                    Child, ...,
  163. **                    End,
  164. **                End,
  165. **
  166. **            ...
  167. **
  168. **            End;
  169. **
  170. ***************************************************************************
  171.  
  172. #define MenustripObject        Mui_NewObjectA(MUIC_Menustrip,[TAG_IGNORE,0
  173. #define MenuObject        Mui_NewObjectA(MUIC_Menu,[TAG_IGNORE,0
  174. #define MenuObjectT(name)    Mui_NewObjectA(MUIC_Menu,[MUIA_Menu_Title,name
  175. #define MenuitemObject        Mui_NewObjectA(MUIC_Menuitem,[TAG_IGNORE,0
  176. #define WindowObject        Mui_NewObjectA(MUIC_Window,[TAG_IGNORE,0
  177. #define ImageObject        Mui_NewObjectA(MUIC_Image,[TAG_IGNORE,0
  178. #define BitmapObject        Mui_NewObjectA(MUIC_Bitmap,[TAG_IGNORE,0
  179. #define BodychunkObject        Mui_NewObjectA(MUIC_Bodychunk,[TAG_IGNORE,0
  180. #define NotifyObject        Mui_NewObjectA(MUIC_Notify,[TAG_IGNORE,0
  181. #define ApplicationObject    Mui_NewObjectA(MUIC_Application,[TAG_IGNORE,0
  182. #define TextObject        Mui_NewObjectA(MUIC_Text,[TAG_IGNORE,0
  183. #define RectangleObject        Mui_NewObjectA(MUIC_Rectangle,[TAG_IGNORE,0
  184. #define ListObject        Mui_NewObjectA(MUIC_List,[TAG_IGNORE,0
  185. #define PropObject        Mui_NewObjectA(MUIC_Prop,[TAG_IGNORE,0
  186. #define StringObject        Mui_NewObjectA(MUIC_String,[TAG_IGNORE,0
  187. #define ScrollbarObject        Mui_NewObjectA(MUIC_Scrollbar,[TAG_IGNORE,0
  188. #define ListviewObject        Mui_NewObjectA(MUIC_Listview,[TAG_IGNORE,0
  189. #define RadioObject        Mui_NewObjectA(MUIC_Radio,[TAG_IGNORE,0
  190. #define VolumelistObject    Mui_NewObjectA(MUIC_Volumelist,[TAG_IGNORE,0
  191. #define FloattextObject        Mui_NewObjectA(MUIC_Floattext,[TAG_IGNORE,0
  192. #define DirlistObject        Mui_NewObjectA(MUIC_Dirlist,[TAG_IGNORE,0
  193. #define SliderObject        Mui_NewObjectA(MUIC_Slider,[TAG_IGNORE,0
  194. #define CycleObject        Mui_NewObjectA(MUIC_Cycle,[TAG_IGNORE,0
  195. #define GaugeObject        Mui_NewObjectA(MUIC_Gauge,[TAG_IGNORE,0
  196. #define ScaleObject        Mui_NewObjectA(MUIC_Scale,[TAG_IGNORE,0
  197. #define BoopsiObject        Mui_NewObjectA(MUIC_Boopsi,[TAG_IGNORE,0
  198. #define ColorfieldObject    Mui_NewObjectA(MUIC_Colorfield,[TAG_IGNORE,0
  199. #define ColorpanelObject    Mui_NewObjectA(MUIC_Colorpanel,[TAG_IGNORE,0
  200. #define ColoradjustObject    Mui_NewObjectA(MUIC_Coloradjust,[TAG_IGNORE,0
  201. #define PaletteObject        Mui_NewObjectA(MUIC_Palette,[TAG_IGNORE,0
  202. #define GroupObject        Mui_NewObjectA(MUIC_Group,[TAG_IGNORE,0
  203. #define RegisterObject        Mui_NewObjectA(MUIC_Register,[TAG_IGNORE,0
  204. #define VirtgroupObject        Mui_NewObjectA(MUIC_Virtgroup,[TAG_IGNORE,0
  205. #define ScrollgroupObject    Mui_NewObjectA(MUIC_Scrollgroup,[TAG_IGNORE,0
  206. #define PopstringObject        Mui_NewObjectA(MUIC_Popstring,[TAG_IGNORE,0
  207. #define PopobjectObject        Mui_NewObjectA(MUIC_Popobject,[TAG_IGNORE,0
  208. #define PoplistObject        Mui_NewObjectA(MUIC_Poplist,[TAG_IGNORE,0
  209. #define PopaslObject        Mui_NewObjectA(MUIC_Popasl,[TAG_IGNORE,0
  210. #define ScrmodelistObject    Mui_NewObjectA(MUIC_Scrmodelist,[TAG_IGNORE,0
  211. #define VGroup            Mui_NewObjectA(MUIC_Group,[TAG_IGNORE,0
  212. #define HGroup            Mui_NewObjectA(MUIC_Group,[MUIA_Group_Horiz,MUI_TRUE
  213. #define ColGroup(cols)        Mui_NewObjectA(MUIC_Group,[MUIA_Group_Columns,(cols)
  214. #define RowGroup(rows)        Mui_NewObjectA(MUIC_Group,[MUIA_Group_Rows   ,(rows)
  215. #define PageGroup        Mui_NewObjectA(MUIC_Group,[MUIA_Group_PageMode,MUI_TRUE
  216. #define VGroupV            Mui_NewObjectA(MUIC_Virtgroup,[TAG_IGNORE,0
  217. #define HGroupV            Mui_NewObjectA(MUIC_Virtgroup,[MUIA_Group_Horiz,MUI_TRUE
  218. #define ColGroupV(cols)        Mui_NewObjectA(MUIC_Virtgroup,[MUIA_Group_Columns,(cols)
  219. #define RowGroupV(rows)        Mui_NewObjectA(MUIC_Virtgroup,[MUIA_Group_Rows   ,(rows)
  220. #define PageGroupV        Mui_NewObjectA(MUIC_Virtgroup,[MUIA_Group_PageMode,MUI_TRUE
  221. #define RegisterGroup(t)    Mui_NewObjectA(MUIC_Register,[MUIA_Register_Titles,(t)
  222. #define End            TAG_DONE])
  223.  
  224. #define Child        MUIA_Group_Child
  225. #define SubWindow    MUIA_Application_Window
  226. #define WindowContents    MUIA_Window_RootObject
  227.  
  228.  
  229.  
  230. ***************************************************************************
  231. **
  232. ** Frame Types
  233. ** -----------
  234. **
  235. ** These macros may be used to specify one of MUI's different frame types.
  236. ** Note that every macro consists of one { ti_Tag, ti_Data } pair.
  237. **
  238. ** GroupFrameT() is a special kind of frame that contains a centered
  239. ** title text.
  240. **
  241. ** HGroup, GroupFrameT("Horiz Groups"),
  242. **      Child, RectangleObject, TextFrame  , End,
  243. **      Child, RectangleObject, StringFrame, End,
  244. **      Child, RectangleObject, ButtonFrame, End,
  245. **      Child, RectangleObject, ListFrame  , End,
  246. **      End,
  247. **
  248. ***************************************************************************
  249.  
  250. #define NoFrame            MUIA_Frame, MUIV_Frame_None
  251. #define ButtonFrame        MUIA_Frame, MUIV_Frame_Button
  252. #define ImageButtonFrame    MUIA_Frame, MUIV_Frame_ImageButton
  253. #define TextFrame        MUIA_Frame, MUIV_Frame_Text
  254. #define StringFrame        MUIA_Frame, MUIV_Frame_String
  255. #define ReadListFrame        MUIA_Frame, MUIV_Frame_ReadList
  256. #define InputListFrame        MUIA_Frame, MUIV_Frame_InputList
  257. #define PropFrame        MUIA_Frame, MUIV_Frame_Prop
  258. #define SliderFrame        MUIA_Frame, MUIV_Frame_Slider
  259. #define GaugeFrame        MUIA_Frame, MUIV_Frame_Gauge
  260. #define VirtualFrame        MUIA_Frame, MUIV_Frame_Virtual
  261. #define GroupFrame        MUIA_Frame, MUIV_Frame_Group
  262. #define GroupFrameT(s)        MUIA_Frame, MUIV_Frame_Group, MUIA_FrameTitle, s
  263.  
  264.  
  265.  
  266. ***************************************************************************
  267. **
  268. ** Spacing Macros
  269. ** --------------
  270. **
  271. ***************************************************************************
  272.  
  273. #define HVSpace            Mui_NewObjectA(MUIC_Rectangle,[TAG_DONE])
  274. #define HSpace(x)        Mui_MakeObjectA(MUIO_HSpace,[x])
  275. #define VSpace(x)        Mui_MakeObjectA(MUIO_VSpace,[x])
  276. #define HCenter(obj)        (HGroup, GroupSpacing(0), Child, HSpace(0), Child, (obj), Child, HSpace(0), End)
  277. #define VCenter(obj)        (VGroup, GroupSpacing(0), Child, VSpace(0), Child, (obj), Child, VSpace(0), End)
  278. #define InnerSpacing(h,v)    MUIA_InnerLeft,(h),MUIA_InnerRight,(h),MUIA_InnerTop,(v),MUIA_InnerBottom,(v)
  279. #define GroupSpacing(x)        MUIA_Group_Spacing,x
  280.  
  281.  
  282.  
  283. ***************************************************************************
  284. **
  285. ** String-Object
  286. ** -------------
  287. **
  288. ** The following macro creates a simple string gadget.
  289. **
  290. ***************************************************************************
  291.         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  292.         !!!!! Be careful, I renamed String macro to StringMUI, to avoid conflicts with E String() function !!!!!
  293.         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  294. #define StringMUI(contents,maxlen)\
  295.     StringObject,\
  296.         StringFrame,\
  297.         MUIA_String_MaxLen  , maxlen,\
  298.         MUIA_String_Contents, contents,\
  299.         End
  300.  
  301. #define KeyString(contents,maxlen,controlchar)\
  302.     StringObject,\
  303.         StringFrame,\
  304.         MUIA_ControlChar    , controlchar,\
  305.         MUIA_String_MaxLen  , maxlen,\
  306.         MUIA_String_Contents, contents,\
  307.         End
  308.  
  309.  
  310.  
  311. ***************************************************************************
  312. **
  313. ** CheckMark-Object
  314. ** ----------------
  315. **
  316. ** The following macro creates a checkmark gadget.
  317. **
  318. ***************************************************************************
  319.  
  320. #define CheckMark(selected)\
  321.     ImageObject,\
  322.         ImageButtonFrame,\
  323.         MUIA_InputMode     , MUIV_InputMode_Toggle,\
  324.         MUIA_Image_Spec    , MUII_CheckMark,\
  325.         MUIA_Image_FreeVert, MUI_TRUE,\
  326.         MUIA_Selected       , selected,\
  327.         MUIA_Background       , MUII_ButtonBack,\
  328.         MUIA_ShowSelState  , FALSE,\
  329.         End
  330.  
  331. #define KeyCheckMark(selected,control)\
  332.     ImageObject,\
  333.         ImageButtonFrame,\
  334.         MUIA_InputMode     , MUIV_InputMode_Toggle,\
  335.         MUIA_Image_Spec    , MUII_CheckMark,\
  336.         MUIA_Image_FreeVert, MUI_TRUE,\
  337.         MUIA_Selected      , selected,\
  338.         MUIA_Background    , MUII_ButtonBack,\
  339.         MUIA_ShowSelState  , FALSE,\
  340.         MUIA_ControlChar   , control,\
  341.         End
  342.  
  343.  
  344.  
  345. ***************************************************************************
  346. **
  347. ** Button-Objects
  348. ** --------------
  349. **
  350. ** Note: Use small letters for KeyButtons, e.g.
  351. **         KeyButton("Cancel",'c')  and not  KeyButton("Cancel",'C') !!
  352. **
  353. ***************************************************************************
  354.  
  355. #define SimpleButton(label) Mui_MakeObjectA(MUIO_Button,[label])
  356.  
  357. #define KeyButton(name,key)\
  358.     TextObject,\
  359.         ButtonFrame,\
  360.         MUIA_Text_Contents, name,\
  361.         MUIA_Text_PreParse, '\ec',\
  362.         MUIA_Text_HiChar  , key,\
  363.         MUIA_ControlChar  , key,\
  364.         MUIA_InputMode      , MUIV_InputMode_RelVerify,\
  365.         MUIA_Background   , MUII_ButtonBack,\
  366.         End
  367.  
  368.  
  369.  
  370. ***************************************************************************
  371. **
  372. ** Cycle-Object
  373. ** ------------
  374. **
  375. ***************************************************************************
  376.  
  377. #define Cycle(entries)          CycleObject, MUIA_Cycle_Entries, entries, End
  378. #define KeyCycle(entries,key) CycleObject, MUIA_Cycle_Entries, entries, MUIA_ControlChar, key, End
  379.  
  380.  
  381.  
  382. ***************************************************************************
  383. **
  384. ** Radio-Object
  385. ** ------------
  386. **
  387. ***************************************************************************
  388.  
  389. #define Radio(name,array)\
  390.     RadioObject,\
  391.         GroupFrameT(name),\
  392.         MUIA_Radio_Entries,array,\
  393.         End
  394.  
  395. #define KeyRadio(name,array,key)\
  396.     RadioObject,\
  397.         GroupFrameT(name),\
  398.         MUIA_Radio_Entries,array,\
  399.         MUIA_ControlChar, key,\
  400.         End
  401.  
  402.  
  403.  
  404. ***************************************************************************
  405. **
  406. ** Slider-Object
  407. ** -------------
  408. **
  409. ***************************************************************************
  410.  
  411. #define Slider(min,max,level)\
  412.     SliderObject,\
  413.         MUIA_Slider_Min  , min,\
  414.         MUIA_Slider_Max  , max,\
  415.         MUIA_Slider_Level, level,\
  416.         End
  417.  
  418. #define KeySlider(min,max,level,key)\
  419.     SliderObject,\
  420.         MUIA_Slider_Min  , min,\
  421.         MUIA_Slider_Max  , max,\
  422.         MUIA_Slider_Level, level,\
  423.         MUIA_ControlChar , key,\
  424.         End
  425.  
  426.  
  427.  
  428. ****************************************************************************
  429. **
  430. ** Button to be used for popup objects
  431. **
  432. ****************************************************************************
  433.  
  434. #define PopButton(img) Mui_MakeObjectA(MUIO_PopButton,[img])
  435.  
  436.  
  437.  
  438. ***************************************************************************
  439. **
  440. ** Labeling Objects
  441. ** ----------------
  442. **
  443. ** Labeling objects, e.g. a group of string gadgets,
  444. **
  445. **     Small: |foo   |
  446. **    Normal: |bar   |
  447. **       Big: |foobar|
  448. **      Huge: |barfoo|
  449. **
  450. ** is done using a 2 column group:
  451. **
  452. ** ColGroup(2),
  453. **        Child, Label2("Small:" ),
  454. **      Child, StringObject, End,
  455. **        Child, Label2("Normal:"),
  456. **      Child, StringObject, End,
  457. **        Child, Label2("Big:"   ),
  458. **      Child, StringObject, End,
  459. **        Child, Label2("Huge:"  ),
  460. **      Child, StringObject, End,
  461. **      End,
  462. **
  463. ** Note that we have three versions of the label macro, depending on
  464. ** the frame type of the right hand object:
  465. **
  466. ** Label1(): For use with standard frames (e.g. checkmarks).
  467. ** Label2(): For use with double high frames (e.g. string gadgets).
  468. ** Label() : For use with objects without a frame.
  469. **
  470. ** These macros ensure that your label will look fine even if the
  471. ** user of your application configured some strange spacing values.
  472. ** If you want to use your own labeling, you'll have to pay attention
  473. ** on this topic yourself.
  474. **
  475. ***************************************************************************
  476.  
  477. #define Label(label)    Mui_MakeObjectA(MUIO_Label,[label,0])
  478. #define Label1(label)    Mui_MakeObjectA(MUIO_Label,[label,MUIO_Label_SingleFrame])
  479. #define Label2(label)    Mui_MakeObjectA(MUIO_Label,[label,MUIO_Label_DoubleFrame])
  480. #define LLabel(label)    Mui_MakeObjectA(MUIO_Label,[label,MUIO_Label_LeftAligned])
  481. #define LLabel1(label)    Mui_MakeObjectA(MUIO_Label,[label,MUIO_Label_LeftAligned OR MUIO_Label_SingleFrame])
  482. #define LLabel2(label)    Mui_MakeObjectA(MUIO_Label,[label,MUIO_Label_LeftAligned OR MUIO_Label_DoubleFrame])
  483.  
  484. #define KeyLabel(label,key)    Mui_MakeObjectA(MUIO_Label,[label,key])
  485. #define KeyLabel1(label,key)    Mui_MakeObjectA(MUIO_Label,[label,Or(MUIO_Label_SingleFrame,key)])
  486. #define KeyLabel2(label,key)    Mui_MakeObjectA(MUIO_Label,[label,Or(MUIO_Label_DoubleFrame,key)])
  487. #define KeyLLabel(label,key)    Mui_MakeObjectA(MUIO_Label,[label,Or(MUIO_Label_LeftAligned,key)])
  488. #define KeyLLabel1(label,key)    Mui_MakeObjectA(MUIO_Label,[label,Or(MUIO_Label_LeftAligned OR MUIO_Label_SingleFrame,key)])
  489. #define KeyLLabel2(label,key)    Mui_MakeObjectA(MUIO_Label,[label,Or(MUIO_Label_LeftAligned OR MUIO_Label_DoubleFrame,key)])
  490.  
  491.  
  492.  
  493. ***************************************************************************
  494. **
  495. ** Controlling Objects
  496. ** -------------------
  497. **
  498. ** set() and get() are two short stubs for BOOPSI GetAttr() and SetAttrs()
  499. ** calls:
  500. **
  501. ** {
  502. **      char *x;
  503. **
  504. **      set(obj,MUIA_String_Contents,"foobar");
  505. **      get(obj,MUIA_String_Contents,&x);
  506. **
  507. **      printf("gadget contains '%s'\n",x);
  508. ** }
  509. **
  510. ***************************************************************************
  511.  
  512. #define get(obj,attr,store)    GetAttr(attr,obj,store)
  513. #define set(obj,attr,value)    SetAttrsA(obj,[obj-obj+(attr),value,TAG_DONE])
  514. #define nnset(obj,attr,value)    SetAttrsA(obj,[MUIA_NoNotify,MUI_TRUE,obj-obj+(attr),value,TAG_DONE])
  515.  
  516. #define setmutex(obj,n)        set(obj,MUIA_Radio_Active,n)
  517. #define setcycle(obj,n)        set(obj,MUIA_Cycle_Active,n)
  518. #define setstring(obj,s)    set(obj,MUIA_String_Contents,s)
  519. #define setcheckmark(obj,b)    set(obj,MUIA_Selected,b)
  520. #define setslider(obj,l)    set(obj,MUIA_Slider_Level,l)
  521.  
  522.  
  523.  
  524. ****************************************************************************
  525. **
  526. ** For Boopsi Image Implementors Only:
  527. **
  528. ** If MUI is using a boopsi image object, it will send a special method
  529. ** immediately after object creation. This method has a parameter structure
  530. ** where the boopsi can fill in its minimum and maximum size and learn if
  531. ** its used in a horizontal or vertical context.
  532. **
  533. ** The boopsi image must use the method id (MUIM_BoopsiQuery) as return
  534. ** value. That's how MUI sees that the method is implemented.
  535. **
  536. ** Note: MUI does not depend on this method. If the boopsi image doesn't
  537. **       implement it, minimum size will be 0 and maximum size unlimited.
  538. **
  539. ****************************************************************************
  540.  
  541. #define MUIP_BoopsiQuery MUI_BoopsiQuery    -> old structure name
  542.  
  543.  
  544.  
  545. ****************************************************************************
  546. ** Macros to hide object names                          **
  547. ****************************************************************************
  548.  
  549. #define MUIC_Notify        'Notify.mui'
  550. #define MUIC_Family        'Family.mui'
  551. #define MUIC_Menustrip        'Menustrip.mui'
  552. #define MUIC_Menu        'Menu.mui'
  553. #define MUIC_Menuitem        'Menuitem.mui'
  554. #define MUIC_Application    'Application.mui'
  555. #define MUIC_Window        'Window.mui'
  556. #define MUIC_Area        'Area.mui'
  557. #define MUIC_Rectangle        'Rectangle.mui'
  558. #define MUIC_Image        'Image.mui'
  559. #define MUIC_Bitmap        'Bitmap.mui'
  560. #define MUIC_Bodychunk        'Bodychunk.mui'
  561. #define MUIC_Text        'Text.mui'
  562. #define MUIC_String        'String.mui'
  563. #define MUIC_Prop        'Prop.mui'
  564. #define MUIC_Gauge        'Gauge.mui'
  565. #define MUIC_Scale        'Scale.mui'
  566. #define MUIC_Boopsi        'Boopsi.mui'
  567. #define MUIC_Colorfield        'Colorfield.mui'
  568. #define MUIC_List        'List.mui'
  569. #define MUIC_Floattext        'Floattext.mui'
  570. #define MUIC_Volumelist        'Volumelist.mui'
  571. #define MUIC_Scrmodelist    'Scrmodelist.mui'
  572. #define MUIC_Dirlist        'Dirlist.mui'
  573. #define MUIC_Group        'Group.mui'
  574. #define MUIC_Register        'Register.mui'
  575. #define MUIC_Virtgroup        'Virtgroup.mui'
  576. #define MUIC_Scrollgroup    'Scrollgroup.mui'
  577. #define MUIC_Scrollbar        'Scrollbar.mui'
  578. #define MUIC_Listview        'Listview.mui'
  579. #define MUIC_Radio        'Radio.mui'
  580. #define MUIC_Cycle        'Cycle.mui'
  581. #define MUIC_Slider        'Slider.mui'
  582. #define MUIC_Coloradjust    'Coloradjust.mui'
  583. #define MUIC_Palette        'Palette.mui'
  584. #define MUIC_Colorpanel        'Colorpanel.mui'
  585. #define MUIC_Popstring        'Popstring.mui'
  586. #define MUIC_Popobject        'Popobject.mui'
  587. #define MUIC_Poplist        'Poplist.mui'
  588. #define MUIC_Popasl        'Popasl.mui'
  589.  
  590.  
  591.  
  592. ****************************************************************************
  593. ** Window                                                                  **
  594. ****************************************************************************
  595.  
  596. #define MUIV_Window_AltHeight_MinMax(p)        (0-(p))
  597. #define MUIV_Window_AltHeight_Visible(p)    (-100-(p))
  598. #define MUIV_Window_AltHeight_Screen(p)        (-200-(p))
  599. #define MUIV_Window_AltTopEdge_Delta(p)        (-3-(p))
  600. #define MUIV_Window_AltWidth_MinMax(p)        (0-(p))
  601. #define MUIV_Window_AltWidth_Visible(p)        (-100-(p))
  602. #define MUIV_Window_AltWidth_Screen(p)        (-200-(p))
  603. #define MUIV_Window_Height_MinMax(p)        (0-(p))
  604. #define MUIV_Window_Height_Visible(p)        (-100-(p))
  605. #define MUIV_Window_Height_Screen(p)        (-200-(p))
  606. #define MUIV_Window_TopEdge_Delta(p)        (-3-(p))
  607. #define MUIV_Window_Width_MinMax(p)        (0-(p))
  608. #define MUIV_Window_Width_Visible(p)        (-100-(p))
  609. #define MUIV_Window_Width_Screen(p)        (-200-(p))
  610.